import { createApp } from 'vue'
//引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

//引入全局样式
import './style/index.scss'

//引入仓库
import pinia from './store'
//引入全局svg组件插件
import gloalComponents from './components/Svgicon/index'
//svg插件
import 'virtual:svg-icons-register'
//element国际化引入
import zhCn from 'element-plus/es/locale/lang/zh-cn'

//引入自定义插件对象
import gloalComponent from '@/components/index'

//引入路由鉴权
import './permisstion';

//引入路由
import router from './router'

//引入群居SVG组件
import SvgIcon from '@/components/Svgicon/index.vue'
//引入暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
const app = createApp(App)
//安装pinia
app.use(pinia)
//安装自定义svg全局插件
app.use(gloalComponents)

//安装自定义全局插件
app.use(gloalComponent)
//注册路由
app.use(router)

app.use(ElementPlus, {
    locale: zhCn,
  })
app.use(ElementPlus)

app.component('SvgIcon',SvgIcon)

import { isHasButton } from './directive/has'
isHasButton(app)
app.mount('#app')
//获取环境变量

